﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using System.Data.SqlClient;

namespace ZhuGe.Demo.Form
{
    public partial class Form1 : System.Windows.Forms.Form
    {
        public Form1()
        {
            InitializeComponent();

        }

        private void btnTestSQLServerConnect_Click(object sender, EventArgs e)
        {
            try
            {
                SqlConnection con = new SqlConnection(this.txtSqlCon.Text);

                con.Open();

                con.Close();

                MessageBox.Show("数据库链接成功！");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
    }
}
